#This script parses the JBoss Instance configuration directories, producing a single flat file that can then be read by bladelogic
from xml.dom import minidom
import os, fnmatch
 
CFD=('/apps/barc-middleware/applications/jboss-as/servers/')
 
ConfFiles = []
for root, dirname, filenames in os.walk(CFD):
    for filename in fnmatch.filter(filenames, 'domain.xml'):
        ConfFiles.append(os.path.join(root, filename))
 
for root, dirname, filenames in os.walk(CFD):
    for filename in fnmatch.filter(filenames, 'standalone.xml'):
        ConfFiles.append(os.path.join(root, filename))
 
for conf in ConfFiles:
    xmldoc = minidom.parse(conf)
    instname = conf.split('/')[1]
    #Networking
    #Get the interfaces
    interfacelist = xmldoc.getElementsByTagName('interface')
    for i in interfacelist:
